<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Welcome to Yogette | Search for Shipped Orders</title>
        <link rel="Yogette icon" type="image/x-icon" href="/yogette.ico"/>
        <link href="<?php echo base_url(); ?>/yogette/css/yogette.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    ul { list-style: none;}
    </style>
    </head>
    <body>
        <div class="main" style="background-color: white;" >
            <img class="pinkcircle" src="<?php echo base_url(); ?>yogette/images/pinkCircle.jpg" ></img>
            <div class="Container" style="background-color: white;">   
                <div class="menulist">
                   <ul class="menulist-ul">
                    <li><img class="ice-cream" src="<?php echo base_url(); ?>yogette/images/logoIcon.jpg"/><a href="/yogette/member"><img src="<?php echo base_url(); ?>yogette/images/mainboard.jpg" class="home" alt="Yogette's Homepage"/></a></li>
                    </ul>
                </div>
                <div class="rss-twitt" style="margin-right: 9em">
                    <div class="rss-twitt-div" >
                        <a class="metadata-blog-div-a" href="contact">help</a>
                        <?php if (!$this->session->userdata('e_logged_in')) { ?>
                                |-| <a class="metadata-blog-div-a" href="/yogette/user/login">Login</a>
                            <?php } else { ?>
                                |-| <a class="metadata-blog-div-a" href="/yogette/user/logout">LogOut</a>
                            <?php } ?>
                    </div><!-- end nav -->
                </div>
                <!-- Branding & Navigation -->
                <div class="mainlogo">
                    <div class="mainlogo-div">
                        <img class="mainlogo-pic" src="<?php echo base_url(); ?>yogette/images/mainlogo.JPG" alt="Yogette"/>
                    </div>
                <div style=" margin: 0em 10em 10em 25em ;">
                    <h1>Enter Customer's Username</h1>
                    <?php
                    echo form_open(base_url() . 'yogette/user/search_reservation');
                    $search_field = array(
                        'name' => 'search_field',
                        'id' => 'search_field',
                        'value' => ''
                    );
                    ?>
                    <ul style="margin: 0em 10em 10em 5em ;">
                        <li>
                            <label>Customer's Username</label>
                            <div>
<?php echo form_input($search_field); ?>
                            </div>
                        </li>   
                        <li>
                            <div>
<?php echo validation_errors(); ?>
                            </div>    
                        </li>
                        <li style="margin: 0em 10em 10em 2em ;">     
<?php echo form_submit(array('name' => 'search'), 'Search'); ?>
                        </li>  
                    </ul>
<?php echo form_close(); ?>
                </div>
 </div>
                    <!-- check if there is movies queue list and print it or not and print the error -->
                        <div class="mainlogo-div" style ="text-align: center; margin: 0em 10em 10em 10em;" >
                            <?php
                            if ($items == false) {
                                ?> 
                        </div>
                        <?php } else { ?>
                        <div class="mainlogo-div" style =" text-align: center; margin: -8em -1em -1em 0em;  ">   
                            <table cellspacing="1" cellpadding="4" border="4">
                                <thead style="font-family:monospace; font-style: oblique">
                                <tr>
                                <td>Order ID</td>
                                <!--<td>Customer ID</td>
                                <td>Product ID</td>-->
                                <td>Product Name</td>
                                <td>Store Location ID</td>
                                <td>Special Description</td>
                                <td>Order Date</td>
                                <td>Status</td>
                                <td>Shipped Date</td>
                                <td>Payment Date</td>
                                </tr>
                                </thead>
                                <tbody id="sortable1">
                                     <input type="hidden" name="items" id="items" 
                                        value="<?php echo $items; ?>" />
                                    <?php
                                    
                                    foreach ($items as $items) {
                                    $order_id = $items->order_id;
                                    echo "<tr id='item_$order_id' class='ui-state-default'>"; ?>
                                        <td><?php echo $items->order_id; ?></td>
                                        <!--<td><?php// echo $items->cus_id; ?></td>
                                        <td><?php// echo $items->prod_id; ?></td>-->
                                        <td><?php echo $items->p_name; ?></td>
                                        <td><?php echo $items->store_loc_id; ?></td>
                                        <td><?php echo $items->special_desc; ?></td>
                                        <td><?php echo $items->order_date; ?></td>
                                        <td><?php echo $items->status; ?></td>
                                        <td><?php echo $items->shipped_on; ?></td>
                                        <td><?php echo $items->payment_date; ?></td>
                                    <?php echo "</tr>"; } ?>
                                </tbody>
                            </table>
                         </div>   
                           <?php } ?> 
                </div>
            </div>
      
        <!-- footer start-->
        <div class="pre-footer">   
        </div>
        <div class="footer">
            <div>
                <p class="footer-p1">yogurt is healthy</p>
            </div>
            <div>
                <p class="footer-p2">Copyright &COPY; 2010 YOGETTE.</p>
            </div>
        </div>
        <img class="post-footer" src="<?php echo base_url(); ?>yogette/blank.jpg" id="blank" name="blank" /> 
        <!-- footer ends-->
    </body>
</html>